from openpyxl import Workbook
from openpyxl import load_workbook
import glob

filepath = "D:\\Develop\\code\\pythonFiles\\excel1\\"
files = glob.glob(filepath+"*."+ "xlsx")

outwb = Workbook()#创建一个新的输出工作簿

sheet = outwb.create_sheet(title='Sheet1',index=0)#创建一个工作表
wbsheet = outwb.active

for filename in files:
    inwb=load_workbook(filename)
    onesheet=inwb.get_sheet_by_name('Sheet1')

    droprow=[1,2,3]
    cnt = 1
    for j in onesheet.values:#循环读取每行的值，并添加到输出表中
        if cnt not in droprow:
            wbsheet.append(j)
        cnt = cnt + 1

outwb.save(r'D:\\合并后excel表格.xlsx')